//=============================================================================

#include <windows.h>
#include "../../../../inc/aProfile.h"

//=============================================================================

aProfile::aProfile()
{
  caption = L"Default";
  
  //keys sets;
  keys[0].key = VK_ESCAPE;
  keys[0].act = KA_CANCEL;
  keys[1].key = 'A';
  keys[1].act = KA_STRAFELEFT;
  keys[2].key = 'D';
  keys[2].act = KA_STRAFERIGHT;
  keys[3].act = KA_MOVEFORWARD;
  keys[3].key = 'W';
  keys[4].act = KA_MOVEBACKWARD;
  keys[4].key = 'S';
  keys[5].act = KA_CROUCH;
  keys[5].key = 'E';
  keys[6].act = KA_JUMP;
  keys[6].key = 'Q';
  keys[7].act = KA_PUSH;
  keys[7].key = VK_LBUTTON;
}

//=============================================================================

keyActions aProfile::apGetAction(WPARAM key) const
{
  for (unsigned int i = 0; i < keysCount; ++i)
    if (keys[i].key == key)
      return keys[i].act;

  return KA_NONE;
}

//=============================================================================

aProfile::~aProfile()
{
}

//=============================================================================
